package com.yue.spitter.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * Created by yueyang on 2016/7/18.
 */
public class SpittrWebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class<?>[] {RootConfig.class};       // 配置ContextLoaderListener
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class<?>[] {WebConfig.class};        // 配置DispatcherServlet
    }

    @Override
    protected String[] getServletMappings() {
        return new String[] {"/"};      // 将一个或者多个路径映射到DispatcherServlet上
    }
}
